# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=websearch
pkgver=4.cb7ef8e
pkgrel=3
groups=('blackarch' 'blackarch-recon')
pkgdesc='Search vhost names given a host range. Powered by Bing..'
arch=('any')
url='https://github.com/PentesterES/WebSearch'
license=('custom:unknown')
makedepends=('git')
depends=('python2' 'python2-simplejson')
source=("$pkgname::git+https://github.com/PentesterES/WebSearch.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i 's|bin/python|bin/python2|' WebSearch.py
}

package() {
  cd $pkgname

  install -Dm 755 WebSearch.py "$pkgdir/usr/bin/$pkgname"
}

